from collections.abc import Iterator
o = isinstance([1,2,], Iterator)
print(o)
o=isinstance({}, Iterator)
print(o)
o=isinstance((x for x in range(10)), Iterator);
print(o)

